#! /bin/ksh
# deconvolution (prediction error filtering) for western data
# Author: Dave
set -v

# set parameters
input=dmostack
#input=dmocmgs
#input=cdp201to800
integer cdp1=201 
integer cdp2=800
integer fold=30

# decon stack
integer count=cdp2-cdp1+1
suwind <$input key=cdp min=$cdp1 max=$cdp2 count=$count |
supef minlag=0.024 maxlag=0.250 |
suximage f2=$cdp1 d2=1 \
	label1="Time (sec)" title="Decon DMO Stack" \
	perc=99 grid1=solid
exit

# determine decon parameters
integer count=fold*(cdp2-cdp1+1)
suwind <$input key=cdp min=$cdp1 max=$cdp2 count=$count |
sugain tpow=2 |
supef minlag=0.024 maxlag=0.250 |
suacor |
suximage f2=$cdp1 d2=0.033333 \
	label1="Time (sec)" title="CMPs $cdp1 to $cdp2" \
	perc=99 grid1=solid
exit

#misc
sunmo cdp=501,801 \
	vnmo=1500,1543,1650,1890,2096,2330,2480,2750 \
	tnmo=0.00,0.40,0.65,1.92,2.95,3.64,4.32,6.00 \
	vnmo=1500,1543,1637,1775,1977,2198,2617,2816 \
	tnmo=0.00,0.40,0.66,1.25,1.95,2.55,4.12,6.00 \
	|
sugain gpow=0.5 |
